package com.carkeeper.web.filter;

public class UrlFilter {
    public static String filterPath = "/api/user,/api/address,/api/dept,/api/employee/**,/api/menu/**,/api/permission/**,/api/role/**,/api/wcart/**,/api/cart/**,/api/categoryReport/**,/api/orderConfig/**,/api/order/**,/api/orderItem/**,/api/orderLog/**,/api/preferential/**,/api/returnCause/**,/api/returnOrder/**,/api/returnOrderItem/**";

    public static boolean hasAuthorize(String url){
        String[] split = filterPath.replace("/**", "").split(",");
        for (String u : split) {
            if (url.startsWith(u)) {
                return true;
            }
        }
        return false;
    }
}
